const db = wx.cloud.database()
const _ = db.command
const list = (longitude, latitude) => {
  //console.log(longitude,latitude);
  return db.collection('mx_store').where({
    location: _.geoNear({
      geometry: db.Geo.Point(latitude,longitude),
      maxDistance: 20000
    }) 
  }).limit(10).get()
}


export default{
  list
}